<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>兑换</title>
<meta name="decorator" content="default" />
<meta name="full-screen" content="yes">
<meta name="viewport"
	content="width=device-width initial-scale=1.0  maximum-scale=1.0">

<%@ include file="/static/mobile-template/default/header.jsp"%>

<script type="text/javascript">
		document.title = "积分况换";
		
		$(document).ready(function() {
			setValues();
			
		});
		
		function setValues(){
			var value = $('#product').val();
			var varlueArray = value.split("-");
			$('#exchangeId').val(varlueArray[0]);
			$('#score').val(varlueArray[1]);
			$('#proName').val(varlueArray[2]);
		}
		
		
	</script>
</head>
<body>
	<div class="main">
		<div>
			<div>
				<div class="ztContent">
				
					 <c:if test="${uid eq '34' }">
					 	<div class="c2">
						</div>
							<p style="font-size:18px;color:red"><b>${config.notice }</b></p>
					 </c:if>
					
				</div>
				<div class="ztContent">
						<form id="inputForm" action="${ctxFront}/wechat/doexchange/${uid}" method="post" onsubmit=" return checkForm();">
							<input type="hidden" name="action" value="reg" /> 
							<input	type="hidden" name="topage" value="${topage }" />
							<input	type="hidden" name="wechatId" value="${wechatId }" />
							<input	type="hidden" name="proName" id="proName"/>
							<input	type="hidden" name="exchangeId" id="exchangeId"/>
							<div align="center">
								

								<div class="control-group">
									<div class="controls" align="left">
										选择商家:&nbsp;&nbsp;
											<select name="seller">
											<option value="一元租车">一元租车</option>
										</select>
									</div>
								</div>
								
								<div class="control-group">
									<div class="controls" align="left">
										选择商品:&nbsp;&nbsp;
										<select id="product" name="product" onchange="setValues()">
											<c:forEach items="${scoreExchangeList }" var="scoreEx">
												<option value="${scoreEx.id }-${scoreEx.score }-${scoreEx.name }">${scoreEx.name }</option>
											</c:forEach>
										</select>
									</div>
								</div>
								
								<div class="control-group">
									<div class="controls" align="left">
										兑换分值:&nbsp;&nbsp;
										<input name="score"  type="text" id="score"
											maxlength="50" class="required" />
									</div>
								</div>
								
								
								
								
								<div   align="center">
									<input id="btnSubmit" class="btn btn-danger" type="submit"
										value="确 定 " />
								</div>
							</div>
						</form>				
				</div>
			</div>
		</div>
	</div>
	
	<c:if test="${uid ne '34' }">
		<%@ include file="/static/mobile-template/default/footer.jsp"%>
	</c:if>
	
</body>
</html>
